#include <igloo/igloo.h>
#include <stdio.h>
#include <stdlib.h>

using namespace igloo;

class Example {
private:
	int atrib1;
	int atrib2;

public:
	Example(int a1, int a2) {
		atrib1 = a1;
		atrib2 = a2;
	}

	int getAtrib1() {
		return atrib1;
	}
	int getAtrib2() {
		return atrib2;
	}

	static int sum(int n) {
		int result = 0;
		for (int i = 1; i <= n; i++) {
			result += i;
		}
		return result;
	}
};

TestFixture(Assertions) {
	TestMethod(ShouldHandleIntegerEquality) {
		Assert::That(Example::sum(5), Is().EqualTo(15));
	}

	TestMethod(ShouldHandleStrings) {
		Example e(5,6);
		char c1[100];

		sprintf(c1, "%d", e.getAtrib1());
		std::string a1(c1);
		sprintf(c1, "%d", e.getAtrib2());
		std::string a2(c1);

		Assert::That(a1, Is().Not().EqualTo(a2));
	}
};

int main() {
	return TestRunner::RunAllTests();
}
